package com.csw.shuanfa.SuanFa;

import java.util.ArrayList;
import java.util.List;

public class T2 {
    public static void main(String[] args) {
        int res = 17;
        int[] ss = {2, 4, 5, 7, 10, 12, 13, 19, 21};
        List listZ = new ArrayList();
        for (int i = 0; i < ss.length - 1; i++) {
            for (int j = i + 1; j < ss.length; j++) {
                System.out.print("】" + ss[i]);
                //】" + ss[j]);
                if (ss[i] + ss[j] == res) {
                    List list = new ArrayList();
                    list.add(ss[i]);
                    list.add(ss[j]);
                    listZ.add(list);
                }
            }
        }
        for (int i = 0; i < listZ.size(); i++) {
            List list = (List) listZ.get(i);
            for (int m = 0; m < list.size(); m++) {
                System.out.print("第一个数】" + list.get(0));
                System.out.print("第二个数】" + list.get(1));
            }
        }
    }
}
